﻿using System;

namespace DotNetImage.Imaging.Filters
{
    public class SmoothFilter : Conv3x3
    {
        [ParameterAttribute(Name = "SmoothWidth", DefaultValue = 1, MinValue = 0, MaxValue = 10000, Step = 1)]
        public int SmoothWidth { get; set; }

        protected override void PrepareData(DotNetImage bmp)
        {
            ConvolutionMatrix m = new ConvolutionMatrix();
            m.SetAll(1);
            m.Pixel = SmoothWidth;
            m.Factor = SmoothWidth + 8;
            base.ConvMatrix = m;
            base.PrepareData(bmp);
        }
    }
}
